home *** CD-ROM | disk | FTP | other *** search
/ Greenhouse Effect Detection Expriment / NASA Greenhouse Effect Detection Expriment 1992 - Disc 2.iso / software / dos / cdf22pc / src / include / cdfcvt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-24  |  2.2 KB  |  76 lines

  1. /******************************************************************************
  2. *
  3. *  NSSDC/CDF                    Header file for CDFconvert.
  4. *
  5. *  Version 1.0, 25-Feb-92, ST Systems (STX)
  6. *
  7. *  Modification history:
  8. *
  9. *   V1.0  25-Feb-92, J Love      Original version.
  10. *
  11. ******************************************************************************/
  12.  
  13. /******************************************************************************
  14. * Function Prototypes.
  15. ******************************************************************************/
  16.  
  17. #if defined(vms) | defined(__MSDOS__)
  18. Boolean StatusHandler (char *, CDFstatus);
  19. Boolean ConvertCDF (char *, char *);
  20. Boolean ConvertAttributes (void);
  21. Boolean ConvertVariables (long, long);
  22. void ROWtoCOL (void *, void *, long, long *, long);
  23. void COLtoROW (void *, void *, long, long *, long);
  24. #endif
  25.  
  26. #if defined(unix)
  27. Boolean StatusHandler ();
  28. Boolean ConvertCDF ();
  29. Boolean ConvertAttributes ();
  30. Boolean ConvertVariables ();
  31. void ROWtoCOL ();
  32. void COLtoROW ();
  33. #endif
  34.  
  35. /******************************************************************************
  36. * Increment to next set of indices, column majority.
  37. ******************************************************************************/
  38.  
  39. #define INCRindicesCOL(numDims,dimSizes,indices) { \
  40. int _z_; \
  41. for (_z_ = 0; _z_ < numDims; _z_++) { \
  42.    if (indices[_z_] == dimSizes[_z_] - 1) \
  43.      indices[_z_] = 0; \
  44.    else { \
  45.      indices[_z_]++; \
  46.      break; \
  47.    } \
  48. } \
  49. }
  50.  
  51. /******************************************************************************
  52. * Increment to next set of indices, row majority.
  53. ******************************************************************************/
  54.  
  55. #define INCRindicesROW(numDims,dimSizes,indices) { \
  56. int _z_; \
  57. for (_z_ = numDims - 1; _z_ >= 0; _z_--) { \
  58.    if (indices[_z_] == dimSizes[_z_] - 1) \
  59.      indices[_z_] = 0; \
  60.    else { \
  61.      indices[_z_]++; \
  62.      break; \
  63.    } \
  64. } \
  65. }
  66.  
  67. /******************************************************************************
  68. * Convert string to uppercase.
  69. ******************************************************************************/
  70.  
  71. #define Upcase(string) { \
  72. int _i_; \
  73. for (_i_ = 0; string[_i_] != NUL; _i_++) \
  74.    if (islower(string[_i_])) string[_i_] = toupper(string[_i_]); \
  75. }
  76.